/**
 * Created by yoyoyk on 2017/5/25.
 */
/**
 * Created by Administrator on 2017/3/30 0030.
 */
import Relay from "react-relay";

export default class findFinanceInvoiceList extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { findFinanceInvoiceList }`;
    }

    getVariables() {
        return {
            argsInput: {
                orderId:this.props.orderId,
                inOrOut:this.props.inOrOut,
                pageNum:this.props.pageNum,
                pageSize:this.props.pageSize,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on findFinanceInvoiceListPayload {
             findFinanceInvoiceList {
                    sumInvoiceMoney
                    authorityId
                    totalResult
                    financeInvoiceList{
                        orderId
                        orderType
                        partyBEnid
                        invoiceMoney
                        partyAEnName
                        contract
                        partyBEnName
                        product
                        invoiceNum
                        partyAEnid
                        createTime
                        inOrOut
                        orderAmount
                        financeInvoiceId
                        invoiceFileJson
                    }
                    errorCode
                }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
             fragment on findFinanceInvoiceListPayload {
                findFinanceInvoiceList {
                    sumInvoiceMoney
                    authorityId
                    totalResult
                    financeInvoiceList{
                        orderId
                        orderType
                        partyBEnid
                        invoiceMoney
                        partyAEnName
                        contract
                        partyBEnName
                        product
                        invoiceNum
                        partyAEnid
                        createTime
                        inOrOut
                        orderAmount
                        financeInvoiceId
                        invoiceFileJson
                    }
                    errorCode
                }
             }
            `]
        }];
    }

}